package com.liu.config;

import org.springframework.amqp.core.AbstractExchange;

import java.util.HashMap;
import java.util.Map;

public class LazyExchange extends AbstractExchange {

    private final String type="x-delayed-message";
    static Map<String,Object> argsMap;

    static{
        argsMap= new HashMap<>();
        argsMap.put("x-delayed-type","direct");
    }



    public LazyExchange(String name){
        super(name,true,false,argsMap);
    }


    @Override
    public String getType() {
        return this.type;
    }
}
